<!DOCTYPE html>
<html>
<head>
    <title>设备闲置记录</title>
    #parse("sys/header.html")
</head>
<style>
    ::-webkit-scrollbar{
        width: 10px;
        height: 10px;
    }
    ::-webkit-scrollbar-thumb{
        border-radius: 10px;
        -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
        background: #a8a5a5;
    }
</style>
<body>
<div id="rrapp" v-cloak>
    <div id="reviewLayer" style="display: none;">
        <form class="form-horizontal" style="width: 350px;">
            <div class="form-group">
                <div class="form-group">
                    <div class="col-sm-3 control-label">设备名称</div>
                    <div class="col-sm-9 control-label"  style="display: flex; flex-wrap: wrap">
                        <div class="label label-success" v-for="item in List" :value="item.value" :key="item.value"
                             style="margin-right: 6px">{{item.devName}}
                        </div>
                    </div>
                </div>

                <!--                <div class="form-group">-->
                <!--                    <div class="col-sm-2 control-label">设备编码</div>-->
                <!--                    <span class="label label-success" style="vertical-align: bottom;">{{devLeaveRecord.devCode}}</span>-->
                <!--                </div>-->
                <div class="form-group">
                    <div class="col-sm-3 control-label"><span style="color: red;">*</span>设备状态</div>
                    <div class="col-sm-9" style="margin-top: 6px">
                        <i-select v-model="devLeaveRecord.status" placeholder="设备状态">
                            <i-option v-for="item in statusList" :value="item.value" :key="item.value">{{item.name}}
                            </i-option>
                        </i-select>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.devName" @on-enter="query" placeholder="设备名称"></i-input>
                </i-col>
                <i-col span="4">
                    <i-input v-model="q.devProductName" @on-enter="query" placeholder="生产线名称/生产线代码"></i-input>
                </i-col>
                <i-col span="4">
                    <i-input v-model="q.devProceName" @on-enter="query" placeholder="工序名称/工序号"></i-input>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                #if($shiro.hasPermission("devleaverecord:review"))
                <i-button type="primary" @click="review"><i class="fa fa-gavel"></i>&nbsp;审核</i-button>
                #end
                #if($shiro.hasPermission("devleaverecord:review"))
                <i-button type="primary" @click="deleteLeave"><i class="fa fa-trash-o"></i>&nbsp;移除闲置</i-button>
                #end
                <!--                #if($shiro.hasPermission("devleaverecord:save"))-->
                <!--                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>-->
                <!--                #end-->
                <!--                #if($shiro.hasPermission("devleaverecord:update"))-->
                <!--                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>-->
                <!--                #end-->
                <!--                #if($shiro.hasPermission("devleaverecord:delete"))-->
                <!--                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>-->
                <!--                #end-->
            </div>
        </Row>
        <table id="jqGrid"></table>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="devLeaveRecord" :rules="ruleValidate" :label-width="80">
            <Row>
                <i-col span="11">
                    <Form-item label="设备编码" prop="devCode">
                        <i-input v-model="devLeaveRecord.devCode" placeholder="设备编码"
                                 icon="md-arrow-dropdown-circle" @on-click="getDeviceInfo"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="设备名称" prop="devName">
                        <i-input v-model="devLeaveRecord.devName" placeholder="设备名称" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="型号" prop="devModel">
                        <i-input v-model="devLeaveRecord.devModel" placeholder="型号"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="数量" prop="devNum">
                        <i-input v-model="devLeaveRecord.devNum" placeholder="数量"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="启用日期" prop="startDate">
                        <Date-picker type="date" v-model="devLeaveRecord.startDate" placeholder="启用日期"></Date-picker>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="原值" prop="origVal">
                        <i-input v-model="devLeaveRecord.origVal" placeholder="原值"></i-input>
                    </Form-item>
                </i-col>
            </Row>

            <Row>
                <!--<i-col span="11">
                    <Form-item label="净值" prop="netVal">
                        <i-input v-model="devLeaveRecord.netVal" placeholder="净值"></i-input>
                    </Form-item>
                </i-col>-->
                <i-col span="11">
                    <Form-item label="使用单位" prop="useUnit">
                        <i-input v-model="devLeaveRecord.useUnit" placeholder="使用单位"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="地点" prop="address">
                        <i-input v-model="devLeaveRecord.address" placeholder="地点"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>

                <!--  <i-col span="11">
                      <Form-item label="状态" prop="status">
                          <i-input v-model="devLeaveRecord.status" placeholder="状态"></i-input>
                      </Form-item>
                  </i-col>-->
                <!-- </Row>
                 <Row>-->
                <i-col span="11">
                    <Form-item label="原因" prop="reson">
                        <i-input type="textarea" v-model="devLeaveRecord.reson" placeholder="原因"></i-input>
                    </Form-item>
                </i-col>
            </Row>

            <!--                <i-col span="11">
                                <Form-item label="设备ID" prop="devId">
                                    <i-input v-model="devLeaveRecord.devId" placeholder="设备ID"></i-input>
                                </Form-item>
                            </i-col>
                        </Row>

                        <Row>
                            <i-col span="11">
                                <Form-item label="资产编号" prop="assertCode">
                                    <i-input v-model="devLeaveRecord.assertCode" placeholder="资产编号"></i-input>
                                </Form-item>
                            </i-col>
                            <i-col span="11">
                                <Form-item label="更新日期" prop="updateDate">
                                    <i-input v-model="devLeaveRecord.updateDate" placeholder="更新日期"></i-input>
                                </Form-item>
                            </i-col>
                            <i-col span="11">
                                <Form-item label="更新者ID" prop="updateUser">
                                    <i-input v-model="devLeaveRecord.updateUser" placeholder="更新者ID"></i-input>
                                </Form-item>
                            </i-col>
                        </Row>
                        <Row>
                            <i-col span="11">
                                <Form-item label="上传日期" prop="createDate">
                                    <i-input v-model="devLeaveRecord.createDate" placeholder="上传日期"></i-input>
                                </Form-item>
                            </i-col>
                        </Row>
                        <i-col span="11">
                            <Form-item label="创建者ID" prop="createUser">
                                <i-input v-model="devLeaveRecord.createUser" placeholder="创建者ID"></i-input>
                            </Form-item>
                        </i-col>-->
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px">
                    返回
                </i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/sys/devleaverecord.js?_${date.systemTime}"></script>
</body>
</html>
